shapefil

$Id: shapefil.h,v 1.52 2011-12-11 22:26:46 fwarmerdam Exp $

Project: Shapelib Purpose: Primary include file for Shapelib.

Members

Aliases

DBFHandle
alias DBFHandle = DBFInfo*
Undocumented in source.
SAFile
alias SAFile = int*

#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) # define SHPAPI_WINDOWS # define SHPAPI_UTF8_HOOKS #endif

SAOffset
alias SAOffset = core.stdc.config.c_ulong
Undocumented in source.
SHPHandle
alias SHPHandle = SHPInfo*
Undocumented in source.
SHPTreeDiskHandle
alias SHPTreeDiskHandle = SHPDiskTreeInfo*
Undocumented in source.

Enums

DBFFieldType
enum DBFFieldType
Undocumented in source.
SHPP_TRISTRIP
anonymousenum SHPP_TRISTRIP
Undocumented in source.
SHPT_NULL
anonymousenum SHPT_NULL
Undocumented in source.

Functions

DBFAddField
int DBFAddField(DBFHandle hDBF, const(char)* pszFieldName, DBFFieldType eType, int nWidth, int nDecimals)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFAddNativeFieldType
int DBFAddNativeFieldType(DBFHandle hDBF, const(char)* pszFieldName, char chType, int nWidth, int nDecimals)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFAlterFieldDefn
int DBFAlterFieldDefn(DBFHandle psDBF, int iField, const(char)* pszFieldName, char chType, int nWidth, int nDecimals)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFCloneEmpty
DBFHandle DBFCloneEmpty(DBFHandle psDBF, const(char)* pszFilename)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFClose
void DBFClose(DBFHandle hDBF)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFCreate
DBFHandle DBFCreate(const(char)* pszDBFFile)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFCreateEx
DBFHandle DBFCreateEx(const(char)* pszDBFFile, const(char)* pszCodePage)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFCreateLL
DBFHandle DBFCreateLL(const(char)* pszDBFFile, const(char)* pszCodePage, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFDeleteField
int DBFDeleteField(DBFHandle hDBF, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetCodePage
const(char)* DBFGetCodePage(DBFHandle psDBF)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetFieldCount
int DBFGetFieldCount(DBFHandle psDBF)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetFieldIndex
int DBFGetFieldIndex(DBFHandle psDBF, const(char)* pszFieldName)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetFieldInfo
DBFFieldType DBFGetFieldInfo(DBFHandle psDBF, int iField, char* pszFieldName, int* pnWidth, int* pnDecimals)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetNativeFieldType
char DBFGetNativeFieldType(DBFHandle hDBF, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFGetRecordCount
int DBFGetRecordCount(DBFHandle psDBF)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFIsAttributeNULL
int DBFIsAttributeNULL(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFIsRecordDeleted
int DBFIsRecordDeleted(DBFHandle psDBF, int iShape)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFMarkRecordDeleted
int DBFMarkRecordDeleted(DBFHandle psDBF, int iShape, int bIsDeleted)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFOpen
DBFHandle DBFOpen(const(char)* pszDBFFile, const(char)* pszAccess)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFOpenLL
DBFHandle DBFOpenLL(const(char)* pszDBFFile, const(char)* pszAccess, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReadDoubleAttribute
double DBFReadDoubleAttribute(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReadIntegerAttribute
int DBFReadIntegerAttribute(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReadLogicalAttribute
const(char)* DBFReadLogicalAttribute(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReadStringAttribute
const(char)* DBFReadStringAttribute(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReadTuple
const(char)* DBFReadTuple(DBFHandle psDBF, int hEntity)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFReorderFields
int DBFReorderFields(DBFHandle psDBF, int* panMap)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFUpdateHeader
void DBFUpdateHeader(DBFHandle hDBF)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteAttributeDirectly
int DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField, void* pValue)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteDoubleAttribute
int DBFWriteDoubleAttribute(DBFHandle hDBF, int iShape, int iField, double dFieldValue)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteIntegerAttribute
int DBFWriteIntegerAttribute(DBFHandle hDBF, int iShape, int iField, int nFieldValue)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteLogicalAttribute
int DBFWriteLogicalAttribute(DBFHandle hDBF, int iShape, int iField, const(char) lFieldValue)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteNULLAttribute
int DBFWriteNULLAttribute(DBFHandle hDBF, int iShape, int iField)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteStringAttribute
int DBFWriteStringAttribute(DBFHandle hDBF, int iShape, int iField, const(char)* pszFieldValue)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
DBFWriteTuple
int DBFWriteTuple(DBFHandle psDBF, int hEntity, void* pRawTuple)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SASetupDefaultHooks
void SASetupDefaultHooks(SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SASetupUtf8Hooks
void SASetupUtf8Hooks(SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCheckBoundsOverlap
int SHPCheckBoundsOverlap(double* padfBox1Min, double* padfBox1Max, double* padfBox2Min, double* padfBox2Max, int nDimension)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPClose
void SHPClose(SHPHandle hSHP)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCloseDiskTree
void SHPCloseDiskTree(SHPTreeDiskHandle hDiskTree)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPComputeExtents
void SHPComputeExtents(SHPObject* psObject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCreate
SHPHandle SHPCreate(const(char)* pszShapeFile, int nShapeType)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCreateLL
SHPHandle SHPCreateLL(const(char)* pszShapeFile, int nShapeType, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCreateObject
SHPObject* SHPCreateObject(int nSHPType, int nShapeId, int nParts, const(int)* panPartStart, const(int)* panPartType, int nVertices, const(double)* padfX, const(double)* padfY, const(double)* padfZ, const(double)* padfM)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCreateSimpleObject
SHPObject* SHPCreateSimpleObject(int nSHPType, int nVertices, const(double)* padfX, const(double)* padfY, const(double)* padfZ)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPCreateTree
SHPTree* SHPCreateTree(SHPHandle hSHP, int nDimension, int nMaxDepth, double* padfBoundsMin, double* padfBoundsMax)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPDestroyObject
void SHPDestroyObject(SHPObject* psObject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPDestroyTree
void SHPDestroyTree(SHPTree* hTree)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPGetInfo
void SHPGetInfo(SHPHandle hSHP, int* pnEntities, int* pnShapeType, double* padfMinBound, double* padfMaxBound)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPOpen
SHPHandle SHPOpen(const(char)* filename, const(char)* pszAcces)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPOpenDiskTree
SHPTreeDiskHandle SHPOpenDiskTree(const(char)* pszQIXFilename, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPOpenLL
SHPHandle SHPOpenLL(const(char)* pszShapeFile, const(char)* pszAccess, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPPartTypeName
const(char)* SHPPartTypeName(int nPartType)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPReadObject
SHPObject* SHPReadObject(SHPHandle hSHP, int iShape)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPRewindObject
int SHPRewindObject(SHPHandle hSHP, SHPObject* psObject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPSearchDiskTree
int* SHPSearchDiskTree(FILE* fp, double* padfBoundsMin, double* padfBoundsMax, int* pnShapeCount)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPSearchDiskTreeEx
int* SHPSearchDiskTreeEx(SHPTreeDiskHandle hDiskTree, double* padfBoundsMin, double* padfBoundsMax, int* pnShapeCount)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPTreeAddShapeId
int SHPTreeAddShapeId(SHPTree* hTree, SHPObject* psObject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPTreeFindLikelyShapes
int* SHPTreeFindLikelyShapes(SHPTree* hTree, double* padfBoundsMin, double* padfBoundsMax, int* pnShapeCount)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPTreeRemoveShapeId
int SHPTreeRemoveShapeId(SHPTree* hTree, int nShapeId)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPTreeTrimExtraNodes
void SHPTreeTrimExtraNodes(SHPTree* hTree)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPTypeName
const(char)* SHPTypeName(int nSHPType)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPWriteHeader
void SHPWriteHeader(SHPHandle hSHP)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPWriteObject
int SHPWriteObject(SHPHandle hSHP, int iShape, SHPObject* psObject)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPWriteTree
int SHPWriteTree(SHPTree* hTree, const(char)* pszFilename)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SHPWriteTreeLL
int SHPWriteTreeLL(SHPTree* hTree, char* pszFilename, SAHooks* psHooks)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Manifest constants

MAX_DEFAULT_TREE_DEPTH
enum MAX_DEFAULT_TREE_DEPTH;
Undocumented in source.
MAX_SUBNODE
enum MAX_SUBNODE;
Undocumented in source.

Structs

DBFInfo
struct DBFInfo
SAHooks
struct SAHooks
Undocumented in source.
SHPDiskTreeInfo
struct SHPDiskTreeInfo
Undocumented in source.
SHPInfo
struct SHPInfo
SHPObject
struct SHPObject
Undocumented in source.
SHPTree
struct SHPTree
Undocumented in source.
SHPTreeNode
struct SHPTreeNode
Undocumented in source.

Variables

XBASE_FLDHDR_SZ
enum int XBASE_FLDHDR_SZ;
Undocumented in source.

Meta

Authors

Frank Warmerdam, warmerdam@pobox.com

***************************************************************************** Copyright (c) 1999, Frank Warmerdam

This software is available under the following "MIT Style" license, or at the option of the licensee under the LGPL (see LICENSE.LGPL). This option is discussed in more detail in shapelib.html.

--

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *****************************************************************************

$Log: shapefil.h,v $ Revision 1.52 2011-12-11 22:26:46 fwarmerdam upgrade .qix access code to use SAHooks (gdal #3365)

Revision 1.51 2011-07-24 05:59:25 fwarmerdam minimize use of CPLError in favor of SAHooks.Error()

Revision 1.50 2011-05-13 17:35:17 fwarmerdam added DBFReorderFields() and DBFAlterFields() functions (from Even)

Revision 1.49 2011-04-16 14:38:21 fwarmerdam avoid warnings with gcc on SHP_CVSID

Revision 1.48 2010-08-27 23:42:52 fwarmerdam add SHPAPI_CALL attribute in code

Revision 1.47 2010-01-28 11:34:34 fwarmerdam handle the shape file length limits more gracefully (#3236)

Revision 1.46 2008-11-12 14:28:15 fwarmerdam DBFCreateField() now works on files with records

Revision 1.45 2008/11/11 17:47:10 fwarmerdam added DBFDeleteField() function

Revision 1.44 2008/01/16 20:05:19 bram Add file hooks that accept UTF-8 encoded filenames on some platforms. Use SASetupUtf8Hooks tosetup the hooks and check SHPAPI_UTF8_HOOKS for its availability. Currently, this is only available on the Windows platform that decodes the UTF-8 filenames to wide character strings and feeds them to _wfopen and _wremove.

Revision 1.43 2008/01/10 16:35:30 fwarmerdam avoid _ prefix on #defined symbols (bug 1840)

Revision 1.42 2007/12/18 18:28:14 bram - create hook for client specific atof (bugzilla ticket 1615) - check for NULL handle before closing cpCPG file, and close after reading.

Revision 1.41 2007/12/15 20:25:32 bram dbfopen.c now reads the Code Page information from the DBF file, and exports this information as a string through the DBFGetCodePage function. This is either the number from the LDID header field ("LDID/<number>") or as the content of an accompanying .CPG file. When creating a DBF file, the code can be set using DBFCreateEx.

Revision 1.40 2007/12/06 07:00:25 fwarmerdam dbfopen now using SAHooks for fileio

Revision 1.39 2007/12/04 20:37:56 fwarmerdam preliminary implementation of hooks api for io and errors

Revision 1.38 2007/11/21 22:39:56 fwarmerdam close shx file in readonly mode (GDAL #1956)

Revision 1.37 2007/10/27 03:31:14 fwarmerdam limit default depth of tree to 12 levels (gdal ticket #1594)

Revision 1.36 2007/09/10 23:33:15 fwarmerdam Upstreamed support for visibility flag in SHPAPI_CALL for the needs of GDAL (gdal ticket #1810).

Revision 1.35 2007/09/03 19:48:10 fwarmerdam move DBFReadAttribute() static dDoubleField into dbfinfo

Revision 1.34 2006/06/17 15:33:32 fwarmerdam added pszWorkField - bug 1202 (rso)

Revision 1.33 2006/02/15 01:14:30 fwarmerdam added DBFAddNativeFieldType

Revision 1.32 2006/01/26 15:07:32 fwarmerdam add bMeasureIsUsed flag from Craig Bruce: Bug 1249

Revision 1.31 2006/01/05 01:27:27 fwarmerdam added dbf deletion mark/fetch

Revision 1.30 2005/01/03 22:30:13 fwarmerdam added support for saved quadtrees

Revision 1.29 2004/09/26 20:09:35 fwarmerdam avoid rcsid warnings

Revision 1.28 2003/12/29 06:02:18 fwarmerdam added cpl_error.h option

Revision 1.27 2003/04/21 18:30:37 warmerda added header write/update public methods

Revision 1.26 2002/09/29 00:00:08 warmerda added FTLogical and logical attribute read/write calls

Revision 1.25 2002/05/07 13:46:30 warmerda added DBFWriteAttributeDirectly().

Revision 1.24 2002/04/10 16:59:54 warmerda added SHPRewindObject

Revision 1.23 2002/01/15 14:36:07 warmerda updated email address

Revision 1.22 2002/01/15 14:32:00 warmerda try to improve SHPAPI_CALL docs